<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <link rel="icon" href="/favicon.ico">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="pragma" content="no-cache">
  <title>融信达智慧能源管理平台</title>
</head>
<style>
  body {
    /* font-family: '宋体'!important; */
  }
</style>

<body>
  <div id="app" class="self_app"></div>
  <script type="module" src="/src/main.js" id="script_ele"></script>
</body>

</html>

<script>
  // let isChrome = navigator.userAgent.indexOf('Chrome') > -1 && navigator.userAgent.indexOf('Edg') < 0;
  // console.log(navigator.userAgent);

  // if (isChrome) {
  //   console.log("宿主环境是chrome浏览器")
  // } else {
    
  //   setInterval(()=>{
  //     document.getElementById("app").innerHTML = "请使用Chrome浏览器打开";
  //   },2000)


  // }

  function set_scale(zoom){
    document.body.style.zoom=zoom;
    console.log("zoom",zoom)
  }

  //缩放包括系统缩放和浏览器缩放。
  function check_scale(){
    let scaled=window.devicePixelRatio;
    console.log("window.devicePixelRatio",window.devicePixelRatio)

    if(scaled==1.25){
      set_scale(0.75);
    }else if(scaled==1.5){
      set_scale(0.8)
    }

  }

  window.addEventListener("resize",function(){
    check_scale();
  },false)


// 1920*1080  scale*1 
// 2060*1440  scale*
window.onload=function(){

  check_scale()
}
</script>